package study.springboot.validation.controller.user.request;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
public class UserAddRequest {

    private String userName;

    private String email;

    @NotNull(message = "年龄不能为空")
    @Min(value = 6, message = "年龄太小")
    @Max(value = 100, message = "年龄太大")
    private int age;

    private Date birthday;
}
